package com.bee.gateway.server.service;

import org.springframework.cloud.gateway.route.RouteDefinition;

import java.util.Collection;

/**
 * @author Damin.yang
 * @date 2019/07/30 18:01
 */
public interface RoutesService {

    /**
     * 加载路由配置
     */
    void loadRouteDefinition();

    /**
     * 获取路由配置
     * @return
     */
    Collection<RouteDefinition> getRouteDefinition();

    /**
     * 保存一条路由规则
     * @param routeDefinition
     * @return
     */
    void save(RouteDefinition routeDefinition);

    /**
     * 删除一条路由规则
     * @param routeId
     * @return
     */
    void delete(String routeId);
}
